package com.zjl.core.service.impl;

import com.zjl.core.dao.BaseUserMapper;
import com.zjl.core.entity.BaseUser;
import com.zjl.core.entity.BaseUserWithBLOBs;
import com.zjl.core.service.BaseUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author : zhangjl
 * @Description :
 * @Created : 2018-05-30 15:09
 **/
public class BaseUserServiceImpl implements BaseUserService {

    @Resource
    private BaseUserMapper userMapper;

    @Override
    public Integer save(BaseUserWithBLOBs baseUser) {
        return userMapper.insert(baseUser);
    }

    /**
     * 根据账号获取用户
     *
     * @param account 账号
     * @return
     */
    @Override
    public BaseUserWithBLOBs getUserByAccount(String account){
        return userMapper.selectByAccount(account);
    }
}
